﻿using System;
using System.Collections.Generic;
using System.Text;
using Elight.Entity;

namespace Elight.Service.Interfaces
{
    public partial interface IAccessService : IBaseService<Sys_Access>
    {
        /// <summary>
        /// 获取权限实体集合。
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <returns></returns>
        IEnumerable<Sys_Access> GetList(int userId);

        /// <summary>
        /// 验证用户是否有当前请求路径的访问权限。
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <param name="requestPath">请求路径</param>
        /// <param name="requestMethod">请求方法</param>
        /// <returns></returns>
        bool Validate(int userId, string requestPath, string requestMethod);
    }
}
